<?php

namespace App\Service\User;

use App\Constants\ErrorCode;
use App\Exception\ApiException;
use App\Model\DiscountVideoUsers;

/**
 * 加入特惠视频
 */
class DiscountVideoJoinService extends UserBaseService
{
    public function handle()
    {
        $userId = $this->getUserId();

        DiscountVideoUsers::checkShowRankPermissions($userId);

        DiscountVideoUsers::joinDiscountVideo($userId);

        return ['result' => 1, 'msg' => '恭喜加入成功'];
    }
}
